package com.healthcloud.dao;

import com.healthcloud.entity.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 基础dao
 * @Author yucl
 * @date 2018/7/24
 */
public interface SmartDAOmapper extends CRUDMapper {

    public int insertTestData(TestDataModel model);
    public int insertQuaData(QualityModel model);
    public int insertLogData(LogModel model);
    public List<VersionModel> searchVersion(VersionModel model);
    public CheckKBModel searchCheck(CheckKBModel model);
    public ProjectKindModel searchProjKind(ProjectKindModel model);
    public List<TestDataModel> searchTestData();
    public int saveCheck(CheckKBModel model);
    public List<TestResultModel> getTestResults(@Param("idCard")String idCard, @Param("beginTime")String beginTime,
                                                @Param("endTime")String endTime, @Param("pagesize")String pagesize, @Param("pageindex")String pageindex,
                                                @Param("testItemName")String testItemName, @Param("companycode")String companycode);
    public List<TestResultModel> checkTestResult(@Param("testListId")String testListId,@Param("testItemNameen")String testItemNameen);
    public List<TestResultModel> onlyCheckTestResult(@Param("entity")TestDataModel entity);
    public List<SaveMeasureModel> getSaveMeasureVO(@Param("entity")TestDataModel entity);
    public List<SNCheckModel> checkSN(@Param("entity")SNCheckModel entity);
    public int pro_hospital_patient(@Param("sn")String sn,@Param("idCard")String idCard,@Param("name")String name);
    public List<UserModel> searchUserList(@Param("hospId")String hospId);
    public List<BpModel> searchBpList(@Param("idCard")String idCard, @Param("beginTime")String beginTime,
                                      @Param("endTime")String endTime, @Param("pagesize")String pagesize, @Param("pageindex")String pageindex);
    public List<BsModel> searchBsList(@Param("idCard")String idCard, @Param("beginTime")String beginTime,
                                      @Param("endTime")String endTime, @Param("pagesize")String pagesize, @Param("pageindex")String pageindex);
    public int bsUpload(BsUploadModel model);
    public int bpUpload(BpUploadModel model);

    /**插入用户表**/
    public int saveUser(UserModel userModel);

    /**插入病人表**/
    public int savePatient(PpPatientBaseModel patientBaseModel);

    /**
     * 传递数据
     * @param id
     * @param status
     */
    public void sendRabbit(@Param("id")int id,@Param("status")int status);

    /**
     * 根据数据查询唯一一条
     * @param imei
     * @return
     */
    public List<BpUploadModel> selectOne(@Param("imei") String imei,
                                         @Param("sys") String sys,
                                         @Param("dia") String dia,
                                         @Param("pul") String pul,
                                         @Param("time") String time);


    public int saveAppCmdMaster(AppCmdMasterModel appCmdMasterModel);
    public void saveAppCmdDetail(AppCmdDetailModel appCmdDetailModel);
    public List<AppCmdDetailModel> queryByAppId(@Param("appId") String appId);
    public List<AppCmdMasterModel> queryAllAppMaster(@Param("pagesize")String pagesize,
                                                     @Param("pageindex")String pageindex,
                                                     @Param("userName") String userName);
    public int insertSmartUploadResult(SmartUploadResult result);
}
